<?php

interface IFeedStorageAdapter
{
    /**
     * Is the named feed an existing one ?
     *
     * @param string $name
     * @return boolean true if exists, false otherwise
     */
    public function hasFeed($name);
    
    /**
     * Creates the new specified feed
     *
     * @param string $name the name of the feed to create
     * @param array $data the meta data
     * @param array $initialEntries the list of initial entries of the feed
     * @return boolean true if created false otherwise
     */
    public function createFeed($name,$data=array(),$initialEntries=array());
    
    /**
     * Returns the feed model for the specified name
     *
     * @param string $name the feed name
     * @throws NotFoundException if feed does not exist
     * @return Zend_Db_Table_Row_Abstract the feed model
     */
    public function getFeed($name);

    /**
     * Returns the feeds rowset
     *
     * @throws NotFoundException if no feeds found
     * @return Zend_Db_Table_Rowset_Abstract the feed model
     */
    public function getFeeds();
    
    /**
     * Deletes the specified feed
     * 
     * @param string $name
     * @return boolean always true
     * @throws Exception if an error occured
     */
    public function deleteFeed($name);
}